﻿#ifndef FACECHECK_H
#define FACECHECK_H

#include <opencv2/core.hpp>
#include <opencv2/core/core.hpp>
#include <opencv2/imgproc/imgproc.hpp>
#include <opencv2/highgui/highgui.hpp>
#include "seeta/FaceLandmarker.h"
#include "seeta/FaceDetector.h"
#include "seeta/FaceAntiSpoofing.h"
#include "seeta/Common/Struct.h"
#include "seeta/FaceRecognizer.h"
#include "seeta/QualityAssessor.h"
#include <QString>
#include <QDebug>
#include <memory>
#include <QMapIterator>
#include <QDir>
#include "lah/Struct_cv.h"
#include "ljh/word2pingyin.h"

const std::string
FaceAntiSpoofing_operating_Infer(
        seeta::FaceDetector* pFD,
        seeta::FaceLandmarker* pFLm, seeta::FaceAntiSpoofing* pFAS,cv::Mat& image);

// FAS INIT
seeta::FaceAntiSpoofing* getFaceAntiSpoofing();

// FR INIT
seeta::FaceRecognizer* getFaceRecognizer(const seeta::ModelSetting& FR);

//提取特一部到位
std::shared_ptr<float> extract(
    seeta::FaceRecognizer* fr,
    const SeetaImageData& image,
    const std::vector<SeetaPointF>& points);

//对比相似度
float compare(seeta::FaceRecognizer* fr,
    const std::shared_ptr<float>& feat1,
    const std::shared_ptr<float>& feat2);

std::shared_ptr<float> FaceRecognizer_infer(
        seeta::FaceRecognizer* FR,
        seeta::FaceLandmarker* FLM5, seeta::FaceDetector* FD,cv::Mat image);

//获取人脸图片
cv::Mat FaceScreenshot_infer( seeta::FaceDetector* FD, cv::Mat image);

//图片质量 INIT
seeta::QualityAssessor* getQualityAssessor();

seeta::QualityResult* QualityAssessor_infer(
        seeta::QualityAssessor* QA,
        seeta::FaceLandmarker* FLM, seeta::FaceDetector* FD, cv::Mat& image);

void faceRecAndDraw(seeta::FaceRecognizer* FR,
                    seeta::FaceLandmarker* FLM5,
                    seeta::FaceDetector* FD,cv::Mat &image,QMap<QVector<QString>,std::shared_ptr<float>> temp);

#endif // FACECHECK_H
